#ifndef __PORTING_H
#define __PORTING_H

#include <stdbool.h>

struct qmutex_t {
    void *private;
    bool (*init)(struct qmutex_t *);
    void (*destroy)(struct qmutex_t *);
    bool (*lock)(struct qmutex_t *);
    void (*unlock)(struct qmutex_t *);
};

struct qsem_t {
    void *private;
    bool (*init)(struct qsem_t *);
    void (*destroy)(struct qsem_t *);
    bool (*wait)(struct qsem_t *);
    void (*post)(struct qsem_t *);
};

bool porting_init(struct qmutex_t **qmutex, struct qsem_t **qsem);
void porting_destroy(struct qmutex_t *qmutex, struct qsem_t *qsem);

#endif/*__PORTING_H*/
